/*
 * Created on 2004-12-16 Author ??
 * 
 * Copyright (c) 2003-2005 by HodeSoft All rights reserved.
 */
package com.common.utils;

import java.util.Enumeration;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.Properties;
import java.util.ResourceBundle;


public class SysConfig 
{
    private static ResourceBundle resources;
    private static Properties parameters;
    public static String imgRealPath;
    public static String ATTRIBUTE_USER_KEY="loginUser";
    
    static
    {
        parameters = new Properties();
        try 
        {
        /*    resources = ResourceBundle.getBundle("freemarker", Locale.getDefault());
            Enumeration e = resources.getKeys();
            while (e.hasMoreElements()) 
            {
                Object key = e.nextElement();
                parameters.put(key, resources.getString(key.toString()));
            }
            imgRealPath=parameters.getProperty("config.img.realpath");*/
            
        } 
        catch (MissingResourceException e) 
        {
            e.printStackTrace(System.err);
        }
    }

    public static String getParameters(String key) 
    {
        String rtn = "";
        if (parameters != null) 
        {
            rtn = parameters.getProperty(key);
        }
        return rtn;
    }

    public static void main(String args[]) 
    {
        System.out.println(SysConfig.imgRealPath);
    }
}